/**
 * 
 */
package org.rado.chessbastard.board.objects;

import org.rado.chessbastard.board.exceptions.InvalidBordSquareException;

/**
 * @author rado
 *
 */
public class BoardSquare implements IBoardSquare {

	private int column,row;
	

	/**
	 * 
	 */
	private static final long serialVersionUID = 2056842462592083275L;

	
	public BoardSquare(int row, int column) throws InvalidBordSquareException {
		if(row>7&&row<0){
			throw new InvalidBordSquareException("Inavlid  row position! Row must be 0=>row<8!Row is"+row);
		}
		if(column>7&&column<0){
			throw new InvalidBordSquareException("Inavlid  column position! Row must be 0=>row<8!Column is"+column);
		}
		this.row=row;
		this.column=column;
	}

	public int getColumn() {
		return column;
	}
	
	
	
	public int getRow() {
		return row;
	}
}
